Skip to main content

Linting References

Reference configurations for linting and code quality setup. Use these as templates when setting up or troubleshooting hooks and CI.

Lefthook Configurations

RepoLinkNotes
Coniglio.lefthook.ymlPHP-only, container
Farfalla.lefthook.ymlPHP-only, with UX patterns
Vito.lefthook.ymlNon-container JS
Micelio.lefthook.ymlContainer JS
Castoro.lefthook.ymlPHP + JS in container
Volpe.lefthook.ymlContainer JS
Fenice.lefthook.ymlMonorepo

CI Configurations

RepoLinkJobs
Farfalla.gitlab-ci.ymllint:php, analyze:static:phpstan
Vito.gitlab-ci.ymllint:js
Micelio.gitlab-ci.ymllint:js
Castoro.gitlab-ci.ymllint:php, analyze:static:phpstan, lint:js
Volpe.gitlab-ci.ymllint:js (integrated)
Fenice.gitlab-ci.ymlRoot install + per-package lint

PHP Tool Setup

  • StyleCI not used; remove .styleci.yml if present
  • Duster: copy farfalla/.php-cs-fixer.dist.php verbatim into each repo
  • Pint: use default config, no pint.json needed
  • TLint: copy farfalla/tlint.json verbatim (disables opinionated rules)

Monorepos / Multi-package JS

Use per-package jobs via root: + glob: in Lefthook. Avoid custom file routing.

Pre-commit (auto-fix):

job-name-per-package:
root: '<pkg>/'
glob: '*.{js,jsx,ts,tsx,vue,html,css,scss,json,md,yml,yaml}'
run: npx prettier --write {staged_files} && npx eslint --fix {staged_files} || true
stage_fixed: true

Pre-push (validate):

job-name:
root: '<pkg>/'
glob: '*.{js,jsx,ts,tsx,vue}'
run: npx eslint {push_files}

CI:

  • yarn install at repo root if root .eslintrc* uses plugins
  • Per-package install, then eslint src and Prettier check for JS/TS/JSON/MD
  • Exclude CSS/SCSS if it causes churn
X

Graph View